home *** CD-ROM | disk | FTP | other *** search
/ Champak 66 / Vol 66.iso / games / doodle_d.swf / scripts / frame_7 / DoAction_4.as < prev    next >
Text File  |  2013-04-24  |  1KB  |  56 lines

  1. eAmount = 1;
  2. ship._x = 320;
  3. ship._y = 240;
  4. dx = 0;
  5. dy = 0;
  6. ship._xscale = 100;
  7. ship._yscale = 100;
  8. dir = 0;
  9. controlTimer = 7;
  10. control = false;
  11. ship._rotation = 0;
  12. color = "0x000000";
  13. dra.onMouseDown = function()
  14. {
  15.    ship.moveTo(_root.ship._xmouse,_root.ship._ymouse);
  16.    ship.lineStyle(2,color,100);
  17.    dra.onMouseMove = function()
  18.    {
  19.       if(Math.abs(_root._xmouse - ship._x) < 250 && Math.abs(_root._ymouse - ship._y) < 225)
  20.       {
  21.          ship.lineTo(_root.ship._xmouse,_root.ship._ymouse);
  22.       }
  23.       updateAfterEvent();
  24.    };
  25. };
  26. dra.onMouseUp = function()
  27. {
  28.    dra.onMouseMove = null;
  29. };
  30. dra.onEnterFrame = function()
  31. {
  32.    if(Key.isDown(32))
  33.    {
  34.       if(ship._height > 10 && ship._width > 10)
  35.       {
  36.          ship._width > 35;
  37.          while(ship._width > 35)
  38.          {
  39.             ship._yscale -= 0.1;
  40.             ship._xscale -= 0.1;
  41.          }
  42.          ship._height > 35;
  43.          while(ship._height > 35)
  44.          {
  45.             ship._xscale -= 0.1;
  46.             ship._yscale -= 0.1;
  47.          }
  48.          ship._x = -500;
  49.          ship._y = -500;
  50.          eAmount = 0;
  51.          control = true;
  52.          gotoAndStop("stop");
  53.       }
  54.    }
  55. };
  56.